package com.ruoyi.employer.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.employer.mapper.CargoConsignerMapper;
import com.ruoyi.employer.domain.CargoConsigner;
import com.ruoyi.employer.service.ICargoConsignerService;

/**
 * 发货人信息Service业务层处理
 * 
 * @author adf
 * @date 2024-08-13
 */
@Service
public class CargoConsignerServiceImpl implements ICargoConsignerService 
{
    @Autowired
    private CargoConsignerMapper cargoConsignerMapper;

    /**
     * 查询发货人信息
     * 
     * @param id 发货人信息主键
     * @return 发货人信息
     */
    @Override
    public CargoConsigner selectCargoConsignerById(Long id)
    {
        return cargoConsignerMapper.selectCargoConsignerById(id);
    }

    /**
     * 查询发货人信息列表
     * 
     * @param cargoConsigner 发货人信息
     * @return 发货人信息
     */
    @Override
    public List<CargoConsigner> selectCargoConsignerList(CargoConsigner cargoConsigner)
    {
        return cargoConsignerMapper.selectCargoConsignerList(cargoConsigner);
    }

    /**
     * 新增发货人信息
     * 
     * @param cargoConsigner 发货人信息
     * @return 结果
     */
    @Override
    public int insertCargoConsigner(CargoConsigner cargoConsigner)
    {
        return cargoConsignerMapper.insertCargoConsigner(cargoConsigner);
    }

    /**
     * 修改发货人信息
     * 
     * @param cargoConsigner 发货人信息
     * @return 结果
     */
    @Override
    public int updateCargoConsigner(CargoConsigner cargoConsigner)
    {
        return cargoConsignerMapper.updateCargoConsigner(cargoConsigner);
    }

    /**
     * 批量删除发货人信息
     * 
     * @param ids 需要删除的发货人信息主键
     * @return 结果
     */
    @Override
    public int deleteCargoConsignerByIds(Long[] ids)
    {
        return cargoConsignerMapper.deleteCargoConsignerByIds(ids);
    }

    /**
     * 删除发货人信息信息
     * 
     * @param id 发货人信息主键
     * @return 结果
     */
    @Override
    public int deleteCargoConsignerById(Long id)
    {
        return cargoConsignerMapper.deleteCargoConsignerById(id);
    }
}
